<?php


namespace app\common\exception;


use think\Exception;

class BaseException extends Exception
{
    public $code = 200;
    public $message = 'OK';

    public function __construct($param = [])
    {
        if (!is_array($param)) return;

        if (array_key_exists('msg', $param)) {
            $this->message = $param['msg'];
        }

        if (array_key_exists('code', $param)) {
            $this->code = $param['code'];
        }
    }
}